
public class 横之和 {
	public static void main(String[] args) {
		int[][] b = { { 1, 2, 3, 5 }, { 2, 4, 6, 8 }, { 1, 2, 3, 4 } };
		
		for (int i = 0; i < b.length; i++) {
			int sum = 0;
			for (int j = 0; j < b[i].length; j++) {
				sum += b[i][j];
			}
			System.out.println("第" + (i + 1) + "行的和为：" + sum);
		}
	}
}
